import selfNaxios from 'utils/ajaxConfig.js';

export function getWorkGanttProgress (param, success, error) {
  return selfNaxios({
      method : 'get',
      url : '/projectInTeam/list',
      params: param
    }, success, error)
}

export function getWorkGanttTable (param, success, error) {
  return selfNaxios({
      method : 'get',
      url : '/projectPlan/project',
      params: param
    }, success, error)
}

export function InsertWorkGanttItem (param, success, error) {
  return selfNaxios({
      method : 'post',
      //url : '/projectPlan/savePlan',
      url : '/schedule/save',
      data: param
    }, success, error)
}

export function getWorkGanttManager (param, success, error) {
  return selfNaxios({
      method : 'get',
      url : '/projectPlan/search',
      params: param
    }, success, error)
}

export function deleteWorkGanttItem (param, success, error) {
  return selfNaxios({
      method : 'post',
//      url : '/projectPlan/delete',
      url : '/schedule/delete',
      data: param
    }, success, error)
}

export function updateWorkGanttItem (param, success, error) {
  return selfNaxios({
      method : 'post',
      url : '/projectPlan/update',
      data: param
    }, success, error)
}

export function getWorkGanttDependName (param, success, error) {
  return selfNaxios({
      method : 'get',
    //  url : '/projectPlan/queryByRoot',
      url : '/schedule/queryById',
      params: param
    }, success, error)
}

export function getUserBaseDataUrl (param, success, error) {
  return selfNaxios({
      method : 'get',
      url : '/user/me',
      params: param
    }, success, error)
}

export function getImportTemplet (param, success, error) {
  return selfNaxios({
      method : 'post',
      url : '/schedule/importTemplate',
      data: param
    }, success, error)
}

export function getPlanTemplet (param, success, error) {
  return selfNaxios({
      method : 'get',
      url : '/schedule/template/search',
      params: param
    }, success, error)
}

export function getAdjustPlan (param, success, error) {
  return selfNaxios({
      method : 'post',
    //  url : '/projectPlan/adjustPlan',
      url:'/schedule/adjust',
      data: param
    }, success, error)
}
export function getDepartmentData (param, success, error) {
  return selfNaxios({
      method : 'get',
    // url : '/projectPlan/queryDept',
    url:"/schedule/queryDept", 
      params: param
    }, success, error)
}